package com.xiaoqi.springboot.web;

import com.xiaoqi.springboot.bean.User;
import com.xiaoqi.springboot.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * @Author Rookie Coder
 * @Description
 * @Date
 **/
@Controller
public class UserController {

    @Autowired
    private UserService userService;

    @RequestMapping("/updateUser")
    @ResponseBody
    public Integer updateUser(String name,Integer id){
        User user = new User(id,name,12);
        return userService.updateUserById(name,id);
    }



}
